package com.youzheng.aop;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class LoginAOP {
    @Pointcut("execution(* com.youzheng.serviceImpl.UserServiceImpl.login(..))")
    private void loPointCut(){
        System.out.println("loPointCut()....");
    }
    @Before("loPointCut()")
    public void logAspect(){
        System.out.println("执行了登录方法");
    }
}
